<template>
  <el-card class="box-card">
    <div slot="header" class="clearfix"><span>商品评价</span></div>
    <div>
      <el-collapse v-model="activeNames">
        <el-collapse-item title="内容样式" name="1">
          <el-form size="medium" label-width="100px">
            <el-form-item label="标题颜色:">
               <ColorPicker :color='data.color' :name='"title"' ></ColorPicker>
            </el-form-item>
            <el-form-item label="查看更多颜色:">
               <ColorPicker :color='data.color' :name='"more"' ></ColorPicker>
            </el-form-item>
            <el-form-item label="用户名颜色:">
               <ColorPicker :color='data.color' :name='"username"' ></ColorPicker>
            </el-form-item>
            <el-form-item label="星级颜色:">
               <ColorPicker :color='data.color' :name='"start"' ></ColorPicker>
            </el-form-item>
            <el-form-item label="评价颜色:">
               <ColorPicker :color='data.color' :name='"evaluate"' ></ColorPicker>
            </el-form-item>
            <el-form-item label="规格颜色:">
              <ColorPicker :color='data.color' :name='"sku"' ></ColorPicker>
            </el-form-item>
            <el-form-item label="背景颜色:">
              <ColorPicker :color='data.color' :name='"bg"' ></ColorPicker>
            </el-form-item>
            <el-form-item label="上间距:">
              <div class="slider_box">
                <el-slider class="slider_item" :max="50" v-model="data.padding.top"></el-slider>
                <el-input-number v-model="data.padding.top" :controls="false" :min="0" :max="50"></el-input-number>
              </div>
            </el-form-item>
            <el-form-item label="下间距:">
              <div class="slider_box">
                <el-slider class="slider_item" :max="50" v-model="data.padding.bottom"></el-slider>
                <el-input-number v-model="data.padding.bottom" :controls="false" :min="0" :max="50"></el-input-number>
              </div>
            </el-form-item>
          </el-form>
        </el-collapse-item>

      </el-collapse>
    </div>
  </el-card>
</template>

<script>
import ColorPicker from '@/components/ColorPicker/index'
export default {
  props: {
    data: {
      type: Object,
      default: {}
    }
  },
  data() {
    return {
      activeNames: ['1', '2']
    };
  },
  components:{
    ColorPicker
  },
};
</script>

<style lang="scss" scoped>
  .bg-color {
    border: 1px solid #E9EDEF;
    box-sizing: border-box;
    padding: 20px 20px 20px 0;
    border-radius: 2px;
    background: #F4F6F8;
  }
</style>
